<%--
    Document   : k3-input
    Created on : 24 Mar 11, 13:09:52
    Author     : Bayu
--%>
<%@page contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
   "http://www.w3.org/TR/html4/loose.dtd">

<html>
    <head>
         <jsp:include page="includes/script.html"/>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
        <title>K3 Update Data</title>
    </head>
    <body>
       <center><h2>K3 Update Data </h2>
            <br>
        <form method="post">

            <c:forEach var="data" items="${data}">

            <table>
                <tr>
                    <td>Tanggal</td>
                    <td><input type="text" name="date" value="${data.date}">
                    <img src="images/calendar.gif" onclick="displayDatePicker('date', false, 'ymd', '-');" />
                    </td>
                </tr>
                <tr>
                    <td>Keterangan</td>
                    <td>
                        <c:set var="select1" value="" />
                        <c:set var="select2" value="" />
                        <c:set var="select3" value="" />
                        
                        <select name="note">
                            <c:if test="${data.note=='T'}">
                                <c:set var="select1" value="selected" />
                            </c:if>
                            <c:if test="${data.note=='R'}">
                                <c:set var="select2" value="selected" />
                            </c:if>
                            <c:if test="${data.note=='B'}">
                                <c:set var="select3" value="selected" />
                            </c:if>
                            <option value="T" ${select1}>Tanpa Kecelakaan</option>
                            <option value="R" ${select2}>Kecelakaan Ringan</option>
                            <option value="B" ${select3}>Kecelakaan Berat</option>
                        </select>
                    </td>
                </tr>
                <tr>
                    <td>Note : </td>
                    <td><textarea name="description">${data.description}</textarea></td>
                </tr>
                <tr>
                    <td colspan="2" align="right"><input  type="submit" name="submit" value="Save" ></td>
                </tr>
            </table>
                </c:forEach>
        </form>

</center>
    </body>
</html>
